﻿<catel:DataWindow x:Class="Catel.Examples.AdvancedDemo.Views.LogicInViewBase.DemoWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:catel="http://catel.codeplex.com"
                  xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">

    <catel:StackGrid>
        <catel:StackGrid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </catel:StackGrid.RowDefinitions>

        <catel:StackGrid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </catel:StackGrid.ColumnDefinitions>

        <TextBlock Text="First name" />
        <TextBox Text="{Binding FirstName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}">
            <i:Interaction.Behaviors>
                <catel:Focus />
            </i:Interaction.Behaviors>
        </TextBox>

        <TextBlock Text="Middle name" />
        <TextBox Text="{Binding MiddleName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />

        <TextBlock Text="Last name" />
        <TextBox Text="{Binding LastName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" />
    </catel:StackGrid>
</catel:DataWindow>